<ng-container *ngIf="!outlet.isActivated">
    <div class="px-5 py-2">
        <!-- <div style="position: relative;"> -->
        <!-- <h4 style="font-size: 1.1rem;font-weight:400;" class="mt-5 mb-5 text-center">**公司车销交款单</h4> -->
        <!-- <div style="width:100px;height:100px;background:#ccc; position:absolute;top: 0;right: 0;"></div> -->
        <!-- </div> -->
        <div class="row">
            <div class="input-group mb-3 col">
                <div class="input-group-prepend">
                    <span class="input-group-text bg border-0">促销单号</span>
                </div>
                <input [(ngModel)]="search.params.name" type="text" class="bg border-l-0 border-r-0 radius-0 border-t-0 form-control">
            </div>
            <div class="input-group mb-3 col">
                <div class="input-group-prepend">
                    <span class="input-group-text bg border-0">客户名称</span>
                </div>
                <div class="border-l-0 border-r-0 radius-0 border-t-0 form-control p-0">
                    <select [(ngModel)]="goods.goodsParentType" class="bg custom-select border-0" title="请选择合同类型">
                        <option *ngFor="let type of parentTypes" [ngValue]="type.value">{{type.text}}</option>
                    </select>
                </div>
                <button tsBtn loading color="success">多选</button>
            </div>
            <div class="input-group mb-3 col">
                <div class="input-group-prepend">
                    <span class="input-group-text bg border-0">开单日期</span></div>
                <input [(ngModel)]="search.params.name" type="text" class="bg border-l-0 border-r-0 radius-0 border-t-0 form-control">
            </div>
            <div class="input-group mb-3 col">
                <div class="input-group-prepend">
                    <span class="input-group-text bg border-0">开始日期</span></div>
                <input [(ngModel)]="search.params.name" type="text" class="bg border-l-0 border-r-0 radius-0 border-t-0 form-control">
            </div>

        </div>
        <div class="row">
            <div class="input-group mb-3 col">
                <div class="input-group-prepend">
                    <span class="input-group-text bg border-0">截止日期</span></div>
                <input [(ngModel)]="search.params.name" type="text" class="bg border-l-0 border-r-0 radius-0 border-t-0 form-control">
            </div>
            <div class="input-group mb-3 col">
                <div class="input-group-prepend">
                    <span class="input-group-text bg border-0">截单日期</span></div>
                <input [(ngModel)]="search.params.name" type="text" class="bg border-l-0 border-r-0 radius-0 border-t-0 form-control">
            </div>
            <div class="input-group mb-3 col">
                <div class="input-group-prepend">
                    <span class="input-group-text bg border-0">业务员</span></div>
                <div class="border-l-0 border-r-0 radius-0 border-t-0 form-control p-0">
                    <select [(ngModel)]="goods.goodsParentType" class="bg custom-select border-0" title="请选择起始日期">
                        <option *ngFor="let type of parentTypes" [ngValue]="type.value">{{type.text}}</option>
                    </select>
                </div>
            </div>
            <div class="input-group mb-3 col">
                <div class="input-group-prepend">
                    <span class="input-group-text bg border-0">理货员</span></div>
                <div class="border-l-0 border-r-0 radius-0 border-t-0 form-control p-0">
                    <select [(ngModel)]="goods.goodsParentType" class="bg custom-select border-0" title="请选择截止日期">
                        <option *ngFor="let type of parentTypes" [ngValue]="type.value">{{type.text}}</option>
                    </select>
                </div>
            </div>
        </div>
        <div class="row">

            <div class="input-group mb-3 col">
                <div class="input-group-prepend">
                    <span class="input-group-text bg border-0">区域</span></div>
                <div class="border-l-0 border-r-0 radius-0 border-t-0 form-control p-0">
                    <select [(ngModel)]="goods.goodsParentType" class="bg custom-select border-0" title="请选择公司抬头">
                        <option *ngFor="let type of parentTypes" [ngValue]="type.value">{{type.text}}</option>
                    </select>
                </div>
                <button tsBtn loading color="success">多选</button>
            </div>
            <div class="input-group mb-3 col"></div>
            <div class="input-group mb-3 col"></div>
            <div class="input-group mb-3 col"></div>
        </div>
    </div>
    <div class="px-5 py-2">
        <div class="form-group">
            <label class="col-form-label label-required text-right mr-3">促销形式</label>
            <ts-checkbox class="mr-5" *ngFor="let sel of payTerms;index as i" color="secondary" [value]="i+1"
                [(ngModel)]="sel.name">
                {{sel.beforeInputLabel}}
                <input *ngIf="sel.hasInput" [(ngModel)]="sel.inputValue" class="border-l-0 border-r-0 radius-0 border-t-0 form-control"
                    style="width:50px !important;" type="text"> {{sel.afterInputLable}}
            </ts-checkbox>
        </div>
        <div class="form-group">
            <label class="col-form-label label-required text-right mr-3">参与场景</label>
            <ts-checkbox class="mr-5" *ngFor="let sel of freightTerm;index as i" color="secondary" [value]="i+1"
                [(ngModel)]="sel.name">
                {{sel.beforeInputLabel}}
                <input *ngIf="sel.hasInput" [(ngModel)]="sel.inputValue" class="border-l-0 border-r-0 radius-0 border-t-0 form-control"
                    style="width:50px !important;" type="text"> {{sel.afterInputLable}}
            </ts-checkbox>
        </div>
    </div>
    <div class="p-2 bg-white my-5">
        <div class="card-body">
            <div class="table-responsive">
                <table class="table table-striped">
                    <tbody>
                        <tr class="font-weight-bold bg-light">
                            <td *ngFor="let th of thFir">{{th}}</td>
                        </tr>
                        <tr>
                            <td>1</td>
                            <td>2</td>
                            <td>
                                <div class="border-0 radius-0 bg-white">
                                    <select [(ngModel)]="goods.goodsParentType" class="bg custom-select border-0" title="单据类型">
                                        <option>车销发货单</option>
                                        <option>车销退货单</option>
                                        <option>费用单</option>
                                    </select>
                                </div>
                            </td>
                            <td>4</td>
                            <td>5</td>
                            <td>6</td>
                            <td>7</td>
                            <td>5</td>
                            <td>6</td>
                            <td>7</td>
                            <td>
                                <ts-checkbox class="mr-5" color="secondary"></ts-checkbox>
                            </td>
                            <td>5</td>
                            <td>6</td>
                            <td>
                                <div tsDropdown>
                                    <span tsToggle class="btn-icon btn-icon-success">
                                        <i tsIcon="gengduo"></i>
                                    </span>
                                    <div tsDropMenu [offsetX]="-57">
                                        <button class="dropdown-item pointer">新增</button>
                                        <button class="dropdown-item pointer">修改</button>
                                        <button class="dropdown-item pointer">删除</button>
                                        <!-- <button class="dropdown-item pointer">复制合同</button>
                                        <button class="dropdown-item pointer">审核</button>
                                        <button class="dropdown-item pointer">取消审核</button> -->
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <div class="text-right">
                <ts-pagination (pageChange)="loadDatas()" [pagination]="pagination" [items]="[{text:'显示 5 条',value:5},{text:'显示 10 条',value:10},{text:'显示 20 条',value:20}]"
                    [color]="global.params.color" goTitle="跳转" prevTitle="上一页" nextTitle="下一页" startTitle="首页" endTitle="末尾"
                    outline></ts-pagination>
            </div>
        </div>
    </div>
    <div class="my-5 m-btn text-right pr-5">
        <button routerLink="/sales/promotionset" tsBtn color="white">返回列表</button>
        <button *ngIf="goods.id===0" tsBtn loading color="success" (submit)="confirmInsert($event)">确定</button>
        <button routerLink="/purchase/contract" tsBtn color="danger">取消</button>
    </div>
</ng-container>

<router-outlet #outlet="outlet"></router-outlet>